<?php

class enrollModel extends Model
{

    protected $_auto = array(
        array('IP','get_client_ip',1,'function'), //注册IP
    );


    public function addEnroll($content)
    {
        $data=array(
            'goods_url' => $content['goods_url'],
            'goods_price' => $content['goods_price'],
            'goods_quan_price' => isset($content['goods_quan_price']) ? $content['goods_quan_price'] : '',
            'person_name' => $content['person_name'],
            'person_tel' => $content['person_tel'],
            'reason' => isset($content['reason']) ? $content['reason'] : '',
            'date_added'=>date('Y-m-d H:i:s', time()),
        );
       if(isset($content['type'])){
           $data['type'] = $content['type'];
       }
        $this->create($data);
        $this->add();
    }

	



}